Skip to content

Conversation

@cigaly
Copy link
Contributor

@cigaly cigaly commented Dec 1, 2024

Jira issue HHH-18868

In org.hibernate.metamodel.internal.MetadataContext#wrapUp id properties for mapped superclass are processed twice. First time with

applyIdMetadata( safeMapping, jpaType )

and second time in loop

for ( Property property : safeMapping.getDeclaredProperties() )

and second value is replacing (at least on some places) first one. Additionally, first value has id flag set to true, second to false.

Proposed solution is checking if property has already been processed ad id property and skips those processed.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.


@gavinking
Copy link
Member

Who is going to review this? @mbladel I think you maybe understand this stuff?

@mbellade mbellade self-assigned this Dec 5, 2024
Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mbellade mbellade merged commit 8129ca0 into hibernate:main Dec 11, 2024
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants